{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# DEBUG: Tips and techniques\n",
    "\n",
    "# EVM's console logs\n",
    "Below cell copies console logs from EVM to user's workspace.\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import TIevm\n",
    "#Path to a folder in user's workspace\n",
    "log_dir='/home/root/notebooks/evm_logs'\n",
    "#Run twice to get additional info from buffers\n",
    "for i in range(2):\n",
    "    TIevm.copy_TI_log(log_dir)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "#log name is hard coded to evm_console.log\n",
    "file = open('/home/root/notebooks/evm_logs/evm_console.log')\n",
    "log_content = file.read()\n",
    "print(log_content)"
   ]
  }
 ],
 "metadata": {
  "celltoolbar": "Tags",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
